1. Field of the Invention
The present disclosure relates generally to network data processing systems and, in particular, to a method and apparatus for communications between a client and a server.
2. Description of the Related Art
In a network data processing system, server computers may provide resources to client devices. These client devices may be, for example, a computer, a mobile phone, a switch, and/or other suitable types of devices. A server application in a server computer may monitor or control remote devices. The monitoring or control may be performed by an agent application running on the remote device.
Communications between an agent application and a server application may be performed in a number of different ways. For example, an agent application may periodically contact a server to send status updates. The agent also may check for any work that may need to be performed. This work may include, for example, changes in configuration, installing software, and other suitable types of work.
An agent also may communicate with a server by listening to a socket for communications from a server application. A socket, in these examples, is an endpoint for communication flows. A socket may take the form of an application programming interface in a transmission control protocol/Internet protocol stack. This type of socket is a listening socket. When the agent application accepts an inbound request for communications, the server application may communicate with the agent application. The server application may send requests for status information, send commands, and make other requests of the agent application.
In another example, a persistent connection may be present between the server application and the agent application. The agent application may contact the server and maintain a connection that allows for communications to flow in both directions.